Developer Documentation
PATH  WebObjects 4.0 Documentation > Serving WebObjects

Table of Contents Previous Section

Making Monitor and MonitorProxy Fail-safe

Because Monitor is a critical piece of any deployment, you should take measures to make sure that it does not fail. To help you achieve this aim, WebObjects provides a simple command-line tool, MonitorDaemon. This tool restarts Monitor or MonitorProxy when they fail. How you use MonitorDaemon depends on the WebObjects deployment platform.

Using MonitorDaemon on Windows NT

When WebObjects is properly installed, the Services Control panel contains two services which use MonitorDaemon to keep Monitor and MonitorProxy running.: "Apple WebObjects Monitor" and "Apple WebObjects MonitorProxy." Use these services to keep Monitor and MonitorProxy up and running.

To make Monitor and MonitorProxy start automatically at boot time, you can configure the services to be started Automatically.

Using MonitorDaemon on Mac OS X Server

On these platforms you can enter the MonitorDaemon tool on a shell command line (such as provided by Terminal.app), start it from a shell script, or configure it to launch Monitor or MonitorProxy automatically at boot time.

For command line usage you pass as arguments the path to the application you want to be launched and then any arguments you want to launch it with. So to start MonitorDaemon for Monitor, you might give the following command:

MonitorDaemon 
/System/Library/WebObjects/Applications/Monitor.woa/Monitor
To have Monitor launched at system boot time, you must add a startup script to /etc/startup. The scripts in /etc/startup follow a naming convention whereby the first four characters of the script filename are numbers. These numbers signify the order in which the system runs the scripts in /etc/startup. You should start Monitor and MonitorProxy near the end of the boot cycle.

You could add the following script, named 3000_Monitor, to /etc/startup to start MonitorDaemon when the system boots and have it keep Monitor running:

#!/bin/sh

# 
# Start Monitor using MonitorDaemon for WebObjects Deployment
#
. /etc/rc.common

# the following is one line:
/System/Library/WebObjects/Applications/Monitor.woa/MonitorDaemon 
/System/Library/WebObjects/Applications/Monitor.woa/Monitor &